<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="div1">456</div>

    <script>
        const m1 = new Map([['a', 111], [11, 222]])
        console.log(m1);
        console.log(m1.size);
        m1.set('c', 333)
        const m2 = new Map([['d', 444]])
        m1.set(m2)
        console.log(m1);
//缺陷1：无序，缺陷2：key必须是字符串
        let obj = {
            name: 'jack',
            age: 18,
            11: 22
        }
for(let v of m1){
    console.log(v);
}

let div1 =document.getElementById('div1');
      console.log(div1);
      const myDiv= {
[div1]:'hello'
      }
      console.log(myDiv);

      let myMap= new Map([[div1,'hello']])
      console.log(myMap);
      for(let abc of myMap){
          console.log(abc);
      }
    </script>
</body>

</html>